package StrategyPattern;/** * Created by Administrator on 2018-10-17. * 野鸭子模型 */public class MallardDuck extends Duck {     public MallardDuck(){         flyBehavior =  new FlyWithWings();         quackBehavior =new Quack();     }     public void display(){           System.out.println("我是一只野鸭子！");     }     public  static  void  main(String[] args){         MallardDuck m = new MallardDuck();         m.display();     }}